﻿<UserControl x:Name="CtrlMandrel"
             x:Class="Titler.Controls.MandrelCtrl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:data="clr-namespace:Titler.ControlModels"
             xmlns:Properties="clr-namespace:Titler.Properties"
             mc:Ignorable="d" 
             MinWidth="200">


    <UserControl.Resources>
        <Style x:Key="{x:Type Label}" TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="2"/>
            <Setter Property="Margin" Value="0,0,0,2"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="FontSize" Value="12pt"/>
        </Style>
        <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
            <Setter Property="Padding" Value="2"/>
            <Setter Property="Margin" Value="0,0,0,2"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFF3F3F3" Offset="0.45"/>
                        <GradientStop Color="#FFE0E0E0" Offset="0.55"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderBrush" Value="#FF707070"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="FontSize" Value="12pt"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
        </Style>
        
        <data:PMControlModel x:Key="pMControlModelView" />
        
    </UserControl.Resources>


    <Grid DataContext="{StaticResource pMControlModelView}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel Margin="0">
            <Label x:Name="Txt_Bypass" Content="Bypass" Margin="0,0,0,2" d:LayoutOverrides="Height"/>
            <Label x:Name="Txt_Flowmeter" Content="Flowmeter" Margin="0" d:LayoutOverrides="Height"/>
        </StackPanel>
        <StackPanel Grid.Column="1" Margin="0">
            <ComboBox x:Name="Bypass" Text="{Binding Bypass}" Margin="0,0,0,2" d:LayoutOverrides="Height"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_Bypass}"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross"
                      ToolTip="Bypass Slot" />
            <ComboBox x:Name="Flowmeter" Text="{Binding Flowmeter}" Margin="0" d:LayoutOverrides="Height"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_Flowmeter}"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross"
                      ToolTip="Flowmeter" />
        </StackPanel>

    </Grid>
</UserControl>
